/*
*  Copyright (C) 2009  Peter Kist & Jan Ripke
*
*  This program is free software: you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation, either version 3 of the License, or
*  (at your option) any later version.
*
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#pragma once

#include <string>


#include <Modules/Logic/Gamestate/States/GameState.h>

namespace galaxy {
    namespace logic {
        namespace engine {

            /** This class abstracts the engines that are used in the game.
            * Engines control game environments. Each environment represents a scale in the game 
            * (e.g. galactic, star-system, planetary)
            */
            class Engine
            {
            public:
                typedef std::string const Name; /**< the engine's name */

            protected:
                /** the game state object. The engines are only used in conjuction with the game state object which
                * contains valuable members.
                */
                gamestate::StatePtr m_State;

            public:
                Engine(gamestate::StatePtr& state);
                virtual ~Engine(void);

                /** initialize the engine */
                virtual bool initialize () = 0;
                /** destroy the engine and free any resources that are in use by the engine */
                virtual bool terminate () = 0;

                /** activate the engine (called after the engine manager changes engine) */
                virtual bool activate () = 0;
                /** deactivate the engine (called after the engine manager changes engine) */
                virtual bool deactivate () = 0;

                virtual Name engineName () = 0;
            };

        } // namespace engine
    } // namespace logic
} // namespace galaxy
